<template>
    <div>
      <!-- 卡片视图 -->
        <el-card>
            <!-- tab标签页 -->
            <el-tabs v-model="activeName">
                <el-tab-pane label="今日会议" name="done">
                    <el-table :data="DoneList" border stripe
                        :header-cell-style="{'text-align':'center'}"
                        :cell-style="{'text-align':'center'}">
                        <el-table-column type="index"></el-table-column>
                        <el-table-column label="会议发起人" prop="applyName" ></el-table-column>
                        <el-table-column label="会议室" prop="meetingRoom"></el-table-column>
                        <el-table-column label="参会人数" prop="applyNum"></el-table-column>
                        <el-table-column label="会议主题" prop="applyTheme"></el-table-column>
                        <el-table-column label="开会日期">
                            <template slot-scope="scope">
                                <div>
                                    {{ $moment(scope.row.meetingDate).format('YYYY/MM/DD') }}
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column label="开会时间">
                            <template slot-scope="scope">
                                <!-- <div v-if="scope.row.applyTimestate == 1">9:30-11:30</div>
                                <div v-if="scope.row.applyTimestate == 2">11:30-13:30</div>
                                <div v-if="scope.row.applyTimestate == 3">15:30-17:30</div>
                                <div v-if="scope.row.applyTimestate == 4">17:30-19:30</div>
                                <div v-if="scope.row.applyTimestate == 5">19:30-20:30</div> -->
                                <div >{{$moment(scope.row.applyStart).format('HH:mm')}}-{{$moment(scope.row.applyEnd).format('HH:mm')}}</div>
                            </template>
                        </el-table-column>
                    </el-table>

                </el-tab-pane>
            </el-tabs>
        </el-card>
    </div>
</template>

<script>
export default {
    data () {
        return {
            DoneList: [],
            NotDoneList: [],
            activeName: 'done',

            doneTotal: 0,
            notDoneTotal: 0
        }
    },
    created () {
        this.getDoneList()
        //this.getNotDoneList()
    },
    methods: {
        async getDoneList () {
           const { data: res } = await this.$http.post('/todaymeeting')
           if (res.code !== 100) {
               return this.$message.error('获取历史会议列表失败！')
            }
            this.DoneList = res.extend.result
           console.log(res)
        },
        handleSizeChangeDone (newSize) {
            this.queryDone.pageSize = newSize
            this.getDoneList()
        },
        handleCurrentChangeDone (newPage) {
            this.queryDone.currentPage = newPage
            this.getDoneList()
        },
        // handleSizeChangeNotDone (newSize) {
        //     this.queryNotDone.pageSize = newSize
        //     this.getNotDoneList()
        // },
        // handleCurrentChangeNotDone (newPage) {
        //     this.queryNotDone.currentPage = newPage
        //     this.getNotDoneList()
        // }

    }
}
</script>

<style scoped>
    .el-tabs {
        margin-top: 15px;
    }
</style>

<style scoped>
.el-table{
  font-size: 13.5px
}
</style>
